<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      7.2.&nbsp;LFS-Bootscripts-20150222
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body class="lfs" id="lfs-8.0">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 8.0
      </h4>
      <h3>
        Chapter&nbsp;7.&nbsp;System Configuration
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="introduction.html" title=
          "Introduction">Prev</a>
          <p>
            Introduction
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="udev.html" title=
          "Overview of Device and Module Handling">Next</a>
          <p>
            Overview of Device and Module Handling
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter07.html" title=
          "Chapter&nbsp;7.&nbsp;System Configuration">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0 ">Home</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-scripts-bootscripts" name="ch-scripts-bootscripts"></a>7.2.
        LFS-Bootscripts-20150222
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <p>
          The LFS-Bootscripts package contains a set of scripts to start/stop
          the LFS system at bootup/shutdown. The configuration files and
          procedures needed to customize the boot process are described in
          the following sections.
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Approximate build time:</strong>
              <span class="segbody">less than 0.1 SBU</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Required disk space:</strong>
              <span class="segbody">244 KB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          7.2.1. Installation of LFS-Bootscripts
        </h2>
        <p>
          Install the package:
        </p>
        <pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="contents-bootscripts" name="contents-bootscripts"></a>7.2.2.
          Contents of LFS-Bootscripts
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed scripts:</strong>
              <span class="segbody">checkfs, cleanfs, console, functions,
              halt, ifdown, ifup, localnet, modules, mountfs, mountvirtfs,
              network, rc, reboot, sendsignals, setclock, ipv4-static, swap,
              sysctl, sysklogd, template, udev, and udev_retry</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed directories:</strong>
              <span class="segbody">/etc/rc.d, /etc/init.d (symbolic link),
              /etc/sysconfig, /lib/services, /lib/lsb (symbolic link)</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="checkfs-bootscripts" name=
                    "checkfs-bootscripts"></a><span class="term"><span class=
                    "command"><strong>checkfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Checks the integrity of the file systems before they are
                    mounted (with the exception of journal and network based
                    file systems)
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="cleanfs-bootscripts" name=
                    "cleanfs-bootscripts"></a><span class="term"><span class=
                    "command"><strong>cleanfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Removes files that should not be preserved between
                    reboots, such as those in <code class=
                    "filename">/var/run/</code> and <code class=
                    "filename">/var/lock/</code>; it re-creates <code class=
                    "filename">/var/run/utmp</code> and removes the possibly
                    present <code class="filename">/etc/nologin</code>,
                    <code class="filename">/fastboot</code>, and <code class=
                    "filename">/forcefsck</code> files
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="console-bootscripts" name=
                    "console-bootscripts"></a><span class="term"><span class=
                    "command"><strong>console</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Loads the correct keymap table for the desired keyboard
                    layout; it also sets the screen font
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="functions-bootscripts" name=
                    "functions-bootscripts"></a><span class=
                    "term"><span class=
                    "command"><strong>functions</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Contains common functions, such as error and status
                    checking, that are used by several bootscripts
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="halt-bootscripts" name=
                    "halt-bootscripts"></a><span class="term"><span class=
                    "command"><strong>halt</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Halts the system
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ifdown-bootscripts" name=
                    "ifdown-bootscripts"></a><span class="term"><span class=
                    "command"><strong>ifdown</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Stops a network device
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ifup-bootscripts" name=
                    "ifup-bootscripts"></a><span class="term"><span class=
                    "command"><strong>ifup</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Initializes a network device
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="localnet-bootscripts" name=
                    "localnet-bootscripts"></a><span class=
                    "term"><span class="command"><strong>localnet</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Sets up the system's hostname and local loopback device
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="modules-bootscripts" name=
                    "modules-bootscripts"></a><span class="term"><span class=
                    "command"><strong>modules</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Loads kernel modules listed in <code class=
                    "filename">/etc/sysconfig/modules</code>, using arguments
                    that are also given there
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mountfs-bootscripts" name=
                    "mountfs-bootscripts"></a><span class="term"><span class=
                    "command"><strong>mountfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Mounts all file systems, except ones that are marked
                    <span class="emphasis"><em>noauto</em></span> or are
                    network based
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="mountvirtfs-bootscripts" name=
                    "mountvirtfs-bootscripts"></a><span class=
                    "term"><span class=
                    "command"><strong>mountvirtfs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Mounts virtual kernel file systems, such as <code class=
                    "systemitem">proc</code>
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="network-bootscripts" name=
                    "network-bootscripts"></a><span class="term"><span class=
                    "command"><strong>network</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Sets up network interfaces, such as network cards, and
                    sets up the default gateway (where applicable)
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="rc-bootscripts" name=
                    "rc-bootscripts"></a><span class="term"><span class=
                    "command"><strong>rc</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    The master run-level control script; it is responsible
                    for running all the other bootscripts one-by-one, in a
                    sequence determined by the name of the symbolic links
                    being processed
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="reboot-bootscripts" name=
                    "reboot-bootscripts"></a><span class="term"><span class=
                    "command"><strong>reboot</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Reboots the system
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sendsignals-bootscripts" name=
                    "sendsignals-bootscripts"></a><span class=
                    "term"><span class=
                    "command"><strong>sendsignals</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Makes sure every process is terminated before the system
                    reboots or halts
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="setclock-bootscripts" name=
                    "setclock-bootscripts"></a><span class=
                    "term"><span class="command"><strong>setclock</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Resets the kernel clock to local time in case the
                    hardware clock is not set to UTC time
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ipv4-static-bootscripts" name=
                    "ipv4-static-bootscripts"></a><span class=
                    "term"><span class=
                    "command"><strong>ipv4-static</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Provides the functionality needed to assign a static
                    Internet Protocol (IP) address to a network interface
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="swap-bootscripts" name=
                    "swap-bootscripts"></a><span class="term"><span class=
                    "command"><strong>swap</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Enables and disables swap files and partitions
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sysctl-bootscripts" name=
                    "sysctl-bootscripts"></a><span class="term"><span class=
                    "command"><strong>sysctl</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Loads system configuration values from <code class=
                    "filename">/etc/sysctl.conf</code>, if that file exists,
                    into the running kernel
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sysklogd-bootscripts" name=
                    "sysklogd-bootscripts"></a><span class=
                    "term"><span class="command"><strong>sysklogd</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Starts and stops the system and kernel log daemons
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="template-bootscripts" name=
                    "template-bootscripts"></a><span class=
                    "term"><span class="command"><strong>template</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    A template to create custom bootscripts for other daemons
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="udev-bootscripts" name=
                    "udev-bootscripts"></a><span class="term"><span class=
                    "command"><strong>udev</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Prepares the <code class="filename">/dev</code> directory
                    and starts Udev
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="udev-retry-bootscripts" name=
                    "udev-retry-bootscripts"></a><span class=
                    "term"><span class=
                    "command"><strong>udev_retry</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Retries failed udev uevents, and copies generated rules
                    files from <code class="filename">/run/udev</code> to
                    <code class="filename">/etc/udev/rules.d</code> if
                    required
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="introduction.html" title=
          "Introduction">Prev</a>
          <p>
            Introduction
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="udev.html" title=
          "Overview of Device and Module Handling">Next</a>
          <p>
            Overview of Device and Module Handling
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter07.html" title=
          "Chapter&nbsp;7.&nbsp;System Configuration">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0 ">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
